Scheme for compressing vertex shader output parameters

ABSTRACT

A graphics processing may include implementing a vertex shader and a pixel shader with a GPU. Vertex parameter values generated by the vertex shader may be stored in a memory. The pixel shader may access the vertex parameter values stored in the memory. Accessing the vertex parameter values may include disabling or bypassing hardware that performs interpolation on vertex parameter values. It is emphasized that this abstract is provided to comply with the rules requiring an abstract that will allow a searcher or other reader to quickly ascertain the subject matter of the technical disclosure. It is submitted with the understanding that it will not be used to interpret or limit the scope or meaning of the claims.

CLAIM OF PRIORITY

This application is a continuation of U.S. patent application Ser. No.16/050,829 filed Jul. 31, 2018, the entire contents of which areincorporated herein by reference. U.S. patent application Ser. No.16/050,829 is a continuation of U.S. patent application Ser. No.14/297,201 filed Jun. 5, 2014, the entire contents of which areincorporated herein by reference. U.S. patent application Ser. No.14/297,201 claims the priority benefit of commonly-assigned U.S.provisional patent application No. 61/833,212 filed Jun. 10, 2013, theentire disclosures of which are incorporated herein by reference.

FIELD OF THE DISCLOSURE

Aspects of the present disclosure are related to computer graphics. Inparticular, the present disclosure is related to use of vertex shadersand pixel shaders in a graphics processing unit.

BACKGROUND

Graphics processing typically involves coordination of two processors, acentral processing unit (CPU) and a graphics processing unit (GPU). TheGPU is a specialized electronic circuit designed to accelerate thecreation of images in a frame buffer intended for output to a display.GPUs are used in embedded systems, mobile phones, personal computers,tablet computers, portable game devices, workstations, and gameconsoles. A GPU is typically designed to be efficient at manipulatingcomputer graphics. GPU's often have a highly parallel processingarchitecture that makes the GPU more effective than a general-purposeCPU for algorithms where processing of large blocks of data is done inparallel.

The CPU may send commands to the GPU to implement a particular graphicsprocessing task, e.g. render a particular texture that has changed withrespect to a previous frame in an image. These draw commands may becoordinated by the CPU with a graphics application interface (API) inorder to issue graphics rendering commands that correspond to the stateof the particular application's virtual environment.

In order to render textures for a particular program, a GPU may performa series of processing tasks in a “graphics pipeline” to translate thevisuals in the virtual environment into images that can be rendered ontoa display. A typical graphics pipeline may include performing certainrendering or shading operations on virtual objects in the virtual space,transformation and rasterization of the virtual objects in the scene toproduce pixel data in a form suitable for output to a display, andadditional rendering tasks on the pixels (or fragments) beforeoutputting the rendered image on the display.

Virtual objects of an image are often described in virtual space interms of shapes known primitives, which together make the shapes of theobjects in the virtual scene. For example, objects in athree-dimensional virtual world to be rendered may be reduced to aseries of distinct triangle primitives having vertices defined in termsof their coordinates in three-dimensional space, whereby these polygonsmake up the surfaces of the objects. Each polygon may have an associatedindex that can be used by the graphics processing system to distinguisha given polygon from other polygons. Likewise, each vertex may have anassociated index that can be used to distinguish a given vertex fromother vertices. A graphics pipeline may perform certain operations onthese primitives to produce visuals for the virtual scene and transformthis data into a two-dimensional format suitable for reproduction by thepixels of the display. The term graphics primitive information (orsimply “primitive information”), as used herein, is used to refer todata representative of a graphics primitive. Such data includes, but isnot limited to, vertex information (e.g., data representing vertexpositions or vertex indices) and polygon information, e.g., polygonindices and information that associates particular vertices withparticular polygons.

A GPU may perform rendering tasks of the graphics pipeline byimplementing programs commonly known as shaders. A typical graphicspipeline may include vertex shaders, which may manipulate certainproperties of the primitives on a per-vertex basis, as well as pixelshaders (also known as “fragment shaders”), which operate downstreamfrom the vertex shaders in the graphics pipeline and may manipulatecertain values on a per-pixel basis before transmitting the pixel datato a display. The pipeline may also include other shaders at variousstages in the pipeline, such as geometry shaders that use the output ofthe vertex shaders to generate a new set of primitives (or correspondingprimitive information), as well as compute shaders (CS) which mayimplemented by a GPU to perform certain other general computationaltasks.

One challenge associated with processing graphics in the pipeline isthat certain bottlenecks may occur and slow down performance as data isinput and output to the various shaders in the pipeline. Moreover, it isdesirable to provide a developer of a particular application running thevisuals with a large amount of control over how shaders utilize variousvisual parameters and underlying data in order to permit them tooptimize the rendering processes. It is within this context that aspectsof the present disclosure arises.

SUMMARY

According to aspects of the present disclosure, a computer graphicsprocessing method may include compressing vertex parameter values with avertex shader; writing the compressed vertex parameter values to acache; accessing the compressed vertex parameter values written to thecache with a pixel shader; and decompressing the compressed vertexparameter values with the pixel shader.

In some implementations, the method may include interpolating thedecompressed vertex parameter values with the pixel shader

In some implementations, accessing the compressed vertex parametervalues includes copying the compressed vertex parameter values from thecache to a local memory unit of a GPU, and accessing the compressedvertex parameter values from the local memory unit with the pixelshader.

In some implementations, the vertex parameter values include parametervalues of all three vertices of a triangle primitive

In some implementations, compressing the vertex parameter valuesincludes storing two floating point numbers together as one value havingtwice as many bits as each of the two floating point numbers.

In some implementations, compressing the vertex parameter valuesincludes storing two 16-bit floating point numbers together as one32-bit value.

In some implementations, the method further includes performing pixelshader computations on the interpolated parameter values.

In some implementations, the method may include, before compressing,modifying the parameter values with the vertex shader.

According to aspects of the present disclosure, a graphics processingsystem may include: a graphic processing unit (GPU); and a cache;wherein the system is configured to implement a graphic processingmethod, the method including: implementing a vertex shader and a pixelshader with the GPU; compressing vertex parameter values with the vertexshader; writing the compressed vertex parameter values to the cache;accessing the compressed vertex parameter values written to the cachewith a pixel shader; and decompressing the compressed vertex parametervalues with the pixel shader.

In some implementations, the GPU includes a plurality of compute unitsand a plurality of local memory units, wherein each of the local memoryunits are associated with a respective one of the compute units.

In some implementations, the cache is integrated with the GPU.

According to aspects of the present disclosure, a non-transitorycomputer readable medium may have computer readable instructionsembodied therein, the computer readable instructions being configured toimplement a graphics processing method when executed, the graphicsprocessing method comprising: compressing vertex parameter values with avertex shader; writing the compressed vertex parameter values to acache; accessing the compressed vertex parameter values written to thecache with a pixel shader; and decompressing the vertex parameter valueswith the pixel shader.

BRIEF DESCRIPTION OF THE DRAWINGS

The teachings of the present disclosure can be readily understood byconsidering the following detailed description in conjunction with theaccompanying drawings, in which:

FIGS. 1A-1C are schematic diagrams of triangular primitives illustrativeof various graphics processing techniques.

FIGS. 1D-1E are flow diagrams of traditional graphics processingtechnique.

FIG. 2A is a schematic diagram of a traditional graphics processingtechnique having similarities to the implementation of FIG. 1E.

FIG. 2B is schematic diagram of a graphics processing technique inaccordance with aspects of the present disclosure.

FIG. 3 is a flow diagram of a graphics processing technique inaccordance with aspects of the present disclosure.

FIG. 4 is a schematic diagram of a system for implementing graphicsprocessing techniques in accordance with aspects of the presentdisclosure.

DESCRIPTION OF THE DRAWINGS

Although the following detailed description contains many specificdetails for the purposes of illustration, anyone of ordinary skill inthe art will appreciate that many variations and alterations to thefollowing details are within the scope of the invention. Accordingly,the exemplary embodiments of the invention described below are set forthwithout any loss of generality to, and without imposing limitationsupon, the claimed invention.

INTRODUCTION

According to aspects of the present disclosure, vertex parameter valuescan be compressed in a manner that permits the underlying absolutevalues of the parameters to be recovered at a later stage in thegraphics pipeline. Compressing these parameter values can reducebottlenecks in a parameter cache and improve performance by providingaccelerated rendering of objects. Moreover, allowing the parametervalues to be decompressed to recover the original vertex parametervalues allows the pixel shaders to directly access them, therebyproviding developers with increased control over how the shaders accessunderlying data for rendering of objects.

BACKGROUND

FIGS. 1A-1C illustrate various aspects of graphics processing techniquesand how interpolation of vertex parameters may be used to processgraphics and render virtual objects in an image. A graphics processingtechnique may utilize a barycentric interpolation process in order todefine parameter values at various locations of the virtual object to bedisplayed.

By way of example, and not by way of limitation, parameter values may bepositions, colors, texture coordinates, lighting, and the like at eachvertex of a primitive located in virtual space, and barycentricinterpolation of these vertex parameters may be used to determine aparameter value at any location within the primitive. For example, anynumber of pixels may be located within the primitive when used to rendera virtual scene on the pixels of the display, and such interpolation ofthe vertex parameter values may be used to determine the correspondingparameter value at the pixel location within the primitive.

Illustrative aspects of an interpolation process using a barycentriccoordinate system are depicted in FIG. 1A. FIG. 1A depicts a polygon(e.g., a triangle) 102 that can be utilized as a primitive forprocessing graphics with a GPU. It is noted that triangles are commonlyused as primitives in graphics processing as they are thetwo-dimensional shapes with the smallest number of vertices (three), andeach triangle is guaranteed to be planar. The surface of a virtualobject, such as a three-dimensional object, in an image to be renderedcan be comprised of a large number of triangle primitives 102 orientedin virtual space. The triangle 102 may include vertices 104 a, 104 b,104 c each having certain parameter values P0, P1, P2, respectively.

By interpolating the vertex parameter values P0, P1, P2, a parametervalue P_(i,j) at any point in the triangle 102 may be defined using alinear relationship between the parameters at the corners of the shape.The coordinates i,j may correspond to the locations of a pixel (or pixelcenter) when the image having the virtual object is rendered in screenspace on a display. Accordingly, this interpolation process may be usedto determine the parameter value for any of the pixels located in theprimitive 102. In any given triangle 102 of a virtual object, there maybe any number of pixel centers located within the triangle. For example,there may be zero, one, ten, or more pixels located within theprimitive.

In order to interpolate the vertex parameters at location i,j, one ofthe vertex parameter values is subtracted out from the parameter valuesof the other vertices, and these subtracted values are multiplied byeach of the barycentric coordinate positions within the triangle 102corresponding to the desired parameter value's location. This can beexpressed mathematically as follows, in which the vertex parameter P0 issubtracted out from the other two vertex parameters P1, P2, and thesesubtracted values are multiplied by the corresponding coordinate valuesi,j:

Pi,j=P0+(P1−P0)i+(P2−P0)j

FIG. 1B depicts a plurality of triangles 102 a-d similar to triangle 102of FIG. 1A which may be used to render a virtual object for a graphicsprocessing application. FIG. 1B and the description below is asimplified schematic description in order to illustrate various aspectsof how vertex parameter data is utilized and stored when implementinggraphics processing techniques.

Each of the triangles 102 a-d has three vertices which may each havecorresponding parameter values. Moreover, the triangles 102 a-d sharemany common vertices and, as such, many of the parameter values arecommon to different triangles. Rather than storing the parameter valuesmultiple times so that they are associated with each of the triangles,each vertex may be assigned an identifying index. By way of a simplifiedexample, the vertices shown in FIG. 1B are each assigned the identifyingindices 0, 1, 3, 9, 10, 4. These indices and their associated parametervalues may be stored in what is commonly known as a “vertex buffer.”Moreover, each of the triangles 102 a-d may be identified by theircorresponding vertex indices, e.g., triangle 102 a may be identified by(0,1,3), triangle 102 b may be identified by (1,3,9), and so forth, andthis information may be stored in what is commonly known as an “indexbuffer.” Accordingly, the common vertex parameter values may beassociated with each distinct triangle 102 a-d through the respectiveindices identified in the buffers.

FIG. 1B also depicts a series of pixel locations a-f overlaid over theprimitives 102 a-d. Interpolation of the parameter values, e.g., asdiscussed above with reference to FIG. 1A may be used to determine aparameter value at each of the pixel locations a-f within each primitivebased on each vertex parameter values and the indices identifying eachprimitive. By way of example, and not by way of limitation, thetriangles 102 a-d may be oriented in a three-dimensional virtualenvironment, and the pixel locations a-f may correspond to the pixels ofa two-dimensional screen used to display an image of the renderedvirtual environment.

FIG. 1C depicts the triangles 102 a and 102 b of FIG. 1B in order toillustrate various aspects of how parameter values may be assigned tothe pixels a, b, c located within the triangles. As shown in FIG. 1C,the vertex parameter values P0, P1, P2 may be uniquely assigned for eachdistinct triangle 102 a, 102 b, and identified based on the indices 0,1, 3, 9 stored in the index buffer. Interpolation can be performed byaccess the corresponding parameter values from the vertex buffer andsubtracting parameter value P0 from the remaining vertex parameters P1,P2, e.g., as described above with reference to FIG. 1A.

As an alternative to interpolating parameter values of each primitive, atechnique known as “flat-shading” may be used. With flat-shading, a“provoking vertex,” e.g. P0, may be defined for each triangle and thedifferences to the remaining vertices, e.g., P1-P0 and P2-P0, are thensimply zeroed out. Any pixels located within the triangle are outputfrom the vertex shader with the parameter value of the provoking vertex.This can save significant overhead associated with the interpolationcomputations; however, it may result in a faceted look for the virtualobject, which may be undesirable in many applications.

In FIG. 1D, a flow diagram is depicted illustrative various aspects ofperforming interpolation of vertex parameters in accordance with onetraditional method 100 a, whereby the entire interpolation is performedbefore being received by the pixel shaders. The method 100 a of FIG. 1Dutilizes the triangles 102 a-d as depicted in FIGS. 1B and 1C in orderto illustrate how the vertex parameters are interpolated in coordinationwith vertex shaders 110 and pixel shaders 112 in order to determineparameter values for pixels a-f (it is noted that a-f may be moreaccurately referred to as fragments or pre-pixels, as furthermodification may be performed by the pixel shaders before outputtingthem to a frame buffer, but they are simply referred to herein as pixelsfor purposes of explanation).

The method 100 a may include performing certain vertex shadercomputations 114 with the vertex shader 110, which may include certainmanipulations of the vertex parameters of a virtual object on aper-vertex basis according to draw commands received from a graphics APIthat coordinates rendered graphics with an application's virtualenvironment. The vertex shader 110 may output corresponding vertexparameter values P0, P1, P2 for each of the triangles 102 a-d as shownin FIG. 1D.

These vertex parameter values P0, P1, P2 are interpolated at 116 foreach triangle in order to determine parameter values P_(a)-P_(f) atpixel locations a-f located within the corresponding triangles 102 a-d.Interpolation at 116 includes subtracting out vertex parameter P0 andfrom the other two vertex parameters P1, P2, multiplying thesesubtracted values by their corresponding barycentric coordinates, andadding the multiplied values to interpolate the parameters at the pixellocations as defined by the coordinates, e.g., as described withreference to FIG. 1A. In the technique depicted in FIG. 1D, theinterpolation 116 is performed entirely by a parameter interpolationhardware component associated with a GPU before the pixel shader program112 receives the parameter values as an input. The pixel shader 112 mayfurther manipulate each pixel a-f by performing certain pixel shadercomputations at 118 on each of the pixels a-f, i.e., on a per-pixelbasis, resulting in output pixels 120, which may then be stored in aframe buffer and can be output as a rendered image on a display.

In FIG. 1E, an alternate flow diagram is depicted illustrative variousaspects of performing interpolation of vertex parameters in accordancewith another traditional method 100 b. The traditional method 100 bdepicted in FIG. 1E is similar to the traditional method 100 a of FIG.1D, except that only the subtraction portion 122 of the interpolation116 is performed before the parameters reach the pixel shader 112. Inthis technique 100 b, this subtraction portion 122 of the interpolation116 is performed by a parameter interpolation hardware componentassociated with a GPU before the pixel shader program 112 receives thesubtracted parameter values as an input and performs the remainder ofthe interpolation 116. Accordingly, the remainder of the interpolation116 of the vertex parameters can be reduced to a simple multiply and addoperation at 124 of the absolute vertex parameter P0, the subtractedparameter values P10, P20 subtracted relative to the parameter P0, andthe coordinates of the desired parameter P relative to the absolutevertex parameter P0, whereby P10=P1−P0 and P20=P1−P0 for each of thecorresponding triangles 102 a-d. This results in the desired parametervalues P_(a)-P_(f) as before, which can then be further manipulated withthe pixel shaders at 118 to generate output pixels 120.

FIG. 2A depicts a schematic of a method 200 a implemented with varioushardware and software components configured to process graphics inaccordance with a traditional method. The method 200 a depicted in FIG.2A is similar to the method 100 b depicted in FIG. 1E.

The vertex shader 210 may perform various vertex shader computations 214that include determining positions 230 of vertices of the primitives inscreen space and various other rendering effects 234 on the vertices ofeach primitive, such manipulating the lighting, shadows, colors, and thelike, of the vertices. The various parameters P0, P1, P2 resulting fromthe vertex shader computations 214 may be written to a parameter cache236 for temporary storage, and a parameter interpolation hardwarecomponent 222 of the system may perform part of the interpolation bysubtracting the parameter values before writing respective sets ofparameters from the parameter cache 236 to each small local memory unit237 of each compute unit of a GPU. Each local memory unit 237 may be asmall but fast local memory unit sometimes known as a local data share(LDS) associated with each compute unit of a GPU, and there may be aplurality of such memory units and compute units running shader programsin parallel.

The vertex shader output positions 230 may be used by a hardwarecomponent 238 that generates barycentric coordinates i,j of pixelsrelative to each primitive so that they may be used to interpolateparameter values, e.g., as described herein. The pixel shader 212 mayaccess the absolute parameter value P0 and the relative parameter valuesP10, P20 from the local data share 237 in order to complete theinterpolation by performing multiply and add operations 224 using thecoordinates of each desired parameter i,j. The pixel shader 212 may thenperform certain further pixel shader computations 218 to furthermanipulate the pixels before outputting them, e.g., to a frame buffer.

One drawback with the technique 200 a described above is that certainbottlenecks associated with throughput of the parameters to the pixelshaders may occur, which may slow down the speed of rendering virtualobjects. For one, it has been recognized that the parameter writethroughput to the parameter cache results in bottlenecks. For example,each parameter may be a large attribute variable, such as, e.g., a32-bit floating point number, and the vertex shader may write theseattribute variables to the parameter cache 236 as a series ofwavefronts, e.g., 4 at a time. Moreover, the parameter cache usage mayfurther limit the number of vertex shader wavefronts that may be stored,creating additional bottlenecks. The parameters are then copied to thelocal data share 237 and temporarily stored before being accessed by thepixel shaders, and the limited throughput and total local data shareusage can again create bottlenecks by limiting the number of pixelshader wavefronts.

Another drawback with the technique 200 a described above is that,because the subtracted parameter values P10, P20 are calculated beforereaching the pixel shader 212, the pixel shaders do not have directaccess to the raw parameter values P1, P2, thereby limiting the types ofrendering effects that can be performed with the pixel shaders.

Implementations

A graphics processing technique 200 b according to various aspects ofthe present disclosure is depicted in FIG. 2B. In the illustratedtechnique 200 b, compression scheme may be utilized in order to minimizebottlenecks associated with the throughput of parameter values outputfrom vertex shaders. It is noted that although this example is describedin terms of primitives in the form of triangles, the concept may bereadily expanded to primitives based on other types of polygons.

One challenge is that vertex parameter values cannot simply becompressed because traditional methods are configured to perform some orall of the interpolation before reaching the pixel shaders. As a result,the subtraction may prevent the original compressed values from beingdecompressed for use by the pixel shaders.

By way of example, and not by way of limitation, where the parametervalues are stored as 32-bit floating point attribute variables, it maynot be possible to compress the parameter into 16-bit numbers forstorage into one 32-bit value without losing the original data as aresult of the 32-bit subtraction. The following example illustrates theproblem using ordinary numbers to conceptualize the problem:

-   -   First triangle: {P0, P1, P2}={8, 5, 6}    -   Second triangle: {P0, P1, P2}={1, 4, 7}

Subtraction of the parameter values for interpolation, e.g., asperformed by the difference engine described above with respect to FIG.2A, would be:

-   -   First triangle: {P0, P10, P20}={8, (5−8), (6−8)}={8, −3, −2}    -   Second triangle: {P0, P10, P20}={1, (4−1), (7−1)}={1, 3, 6}

Compressing the first set of parameters with the second set ofparameters would be analogous to putting them together as follows:

-   -   Compressed parameters: {18, 45, 76}

And subtraction of the compressed parameters would be analogous to:

-   -   Subtraction: {18, (45−18), (76−18)}={18, 27, 58}

As compressed, the subtraction destroys the original data because thesubtraction results 27, 58 are essentially meaningless with respect tothe true parameter values. As such, values cannot be decompressed andthe original P10, P20, or P1, P2 cannot be recovered from thesubtraction results.

Turning again to FIG. 2B, the technique 200 b includes a compressionscheme according to various aspects of the present disclosure thatallows for the original parameter values to be preserved anddecompressed so that they may be accessed by the pixel shader. In theillustrated implementation, parameter interpolation hardware thattraditionally performs the subtraction or entire interpolation may beomitted, disabled, or bypassed so that the parameter values may becompressed and decompressed without losing the original parametervalues.

In the technique 200 b depicted in FIG. 2B, the vertex shader 210 mayperform vertex shader computations 214, which may include manipulatingvarious parameters of each vertices in the image. The resultingparameters may be compressed at 240 into a smaller data format so thatbottlenecks associated with storage and throughput of large numbers maybe minimized.

The compressed parameters P0′, P1′, P2′ may be written to a parametercache 236 for temporary storage, and may occupy a smaller amount of thetotal cache than uncompressed parameters to thereby minimize potentialbottlenecks in the cache hardware. The compressed parameters P0′, P1′,P2′ may be copied to a local memory unit 237 on a GPU, which may bememory unit known as a “local data share” (LDS). The compressedparameter values may be accessed from the local data share with a pixelshader 212 implemented by a GPU.

The compressed parameter values P0′, P1′, P2′ may be decompressed at 242by the pixel shader 212, thereby granting access to the raw parametervalues P0, P1, P2 by the pixel shader. The pixel shader 212 may theninterpolate the parameter values at 216 using coordinates i,j obtainedfrom the barycentric coordinate generator 238 in order to determinecorresponding parameter values at the pixel locations within eachprimitive. Because the pixel shader 212 has access to the raw parametervalues for each vertex of each triangle, the pixel shader 216 may alsoperform certain other manipulations of the vertex parameters (notpictured) and the visuals of the vertices in virtual space on aper-pixel basis before interpolation 216 to translate the values toscreen space. The pixel shader may then perform pixel shadercomputations 218 to further manipulation of the pixel data and thevisuals of the pixels before outputting the final pixel data, e.g., to aframe buffer.

Accordingly, in the illustrative implementation 200 b, bottlenecksassociated with the large amounts of parameter value data may beminimized or avoided by a compression scheme that reduces total used ofthe cache 236 and local memory 237. Moreover, programmers creating pixelshader programs may have increased control because they have access tothe raw vertex parameter data, not just the relative or interpolatedvalues.

The flow diagram shown in FIG. 3 illustrates a method 300 for processinggraphics with vertex shaders and pixel shaders according to variousaspects of the present disclosure. The method 300 has similarities tothe graphics processing technique 200 b depicted in FIG. 2B.

The illustrative method 300 includes performing vertex shadercomputations 314 with a vertex shader 310. The vertex shadercomputations may include manipulating various vertex parameters of theprimitives 302 a-d to produce various visual effects on the vertices invirtual space. The primitives 302 a-d may be similar to the triangles102 a-d in FIG. 1B, and each triangle may have corresponding parametervalues P0, P1, P2 for each vertex.

The vertex shader 310 may then compress the parameter values and sendthe compressed vertex parameter values P0′, P1′, P2′ to the pixel shader312. The pixel shader may then decompress the parameter values at 342 toget the original raw parameter values, and the pixel shader 312 mayperform the entire interpolation 316 of the parameter values P0, P1, P2to determine the corresponding parameters P_(a)-P_(f) of each pixel. Thepixel shader 312 may then produce additional visual effects on thepixels by performing pixel shader computations 318 on the pixels withinterpolated parameter values, and may output the rendered pixels 320,e.g., to a frame buffer in system memory.

Aspects of the present disclosure include graphics processing systemsthat are configured to implement the features discussed above. By way ofexample, and not by way of limitation, FIG. 4 illustrates a blockdiagram of a computer system 400 that may be used to implement graphicsprocessing according to aspects of the present disclosure. According toaspects of the present disclosure, the system 400 may be an embeddedsystem, mobile phone, personal computer, tablet computer, portable gamedevice, workstation, game console, and the like.

The system 400 generally may include a central processor unit (CPU) 470,a graphics processor unit (GPU) 471, and a main memory 472 that isaccessible to both the CPU and GPU. The CPU 470 and GPU 471 may eachinclude one or more processor cores, e.g., a single core, two cores,four cores, eight cores, or more. The main memory 472 may be in the formof an integrated circuit that provides addressable memory, e.g., RAM,DRAM, and the like.

By way of example, and not by way of limitation, the CPU 470 and GPU 471may access the main memory 472 using a data bus 476. In some cases, itmay be useful for the system 400 to include two or more different buses.The main memory 472 may contain data that can be accessed by the CPU 470and GPU 472. The main memory may temporarily store buffers of data,which may include vertex buffers 463, index buffers 466, and framebuffers 464.

The CPU may be configured to execute CPU code, which may include anapplication 460 utilizing rendered graphics, a driver/compiler 461 andgraphics API 462 for issuing draw commands to programs implemented bythe GPU. The CPU code may also implement physics simulations and otherfunctions. The GPU may be configured to operate as discussed above withrespect illustrative implementations of the present disclosure. Inparticular, the GPU may execute GPU code, which may implement vertexshaders 410 and pixel shaders 412, as discussed above. The shaders mayinterface with data in the main memory 472 and the pixel shaders mayoutput rendered pixels in the frame buffer 464 for temporary storagebefore being output to a display. The GPU may include a plurality ofcompute units (CU) 465 configured to perform graphics processing tasksin parallel. Each compute unit may include its own dedicated localmemory store, such as a local data share (LDS) 437 described above.

The system 400 may also include a cache 436 for temporarily storingcompressed vertex parameter data 468, and data may be copied from thecache 436 to each LDS 437, which may then implement shader programs thatutilize the data in parallel. The parameter cache 436 may be integratedwith the GPU, or may be distinct from the GPU and accessible to the GPU,e.g., via the bus 476. The GPU may also execute other programs, such as,e.g., geometry shaders and compute shaders.

The system 400 may also include well-known support functions 477, whichmay communicate with other components of the system, e.g., via the bus476. Such support functions may include, but are not limited to,input/output (I/O) elements 479, power supplies (P/S) 480, and a clock(CLK) 481.

The apparatus 400 may optionally include a mass storage device 484 suchas a disk drive, CD-ROM drive, flash memory, tape drive, or the like tostore programs and/or data. The device 400 may also include a displayunit 486 and user interface unit 488 to facilitate interaction betweenthe apparatus 400 and a user. The display unit 486 may be in the form ofa flat panel display, cathode ray tube (CRT) screen, touch screen, orother device that can display text, numerals, graphical symbols orimages. The display 486 may display rendered images 487 processed inaccordance with various techniques described herein. The user interface488 may include a keyboard, mouse, joystick, light pen, game controller,or other device that may be used in conjunction with a graphical userinterface (GUI). The system 400 may also include a network interface 490to enable the device to communicate with other devices over a network.The network may be, e.g., a local area network (LAN), a wide areanetwork such as the internet, a personal area network, such as aBluetooth network or other type of network. These components may beimplemented in hardware, software, or firmware, or some combination oftwo or more of these.

While the above is a complete description of the preferred embodiment ofthe present invention, it is possible to use various alternatives,modifications and equivalents. Therefore, the scope of the presentinvention should be determined not with reference to the abovedescription but should, instead, be determined with reference to theappended claims, along with their full scope of equivalents. Any featuredescribed herein, whether preferred or not, may be combined with anyother feature described herein, whether preferred or not. In the claimsthat follow, the indefinite article “A”, or “An” refers to a quantity ofone or more of the item following the article, except where expresslystated otherwise. The appended claims are not to be interpreted asincluding means-plus-function limitations, unless such a limitation isexplicitly recited in a given claim using the phrase “means for.”

What is claimed is:
 1. A computer graphics processing method comprising:storing vertex parameter values generated by a vertex shader in amemory; and accessing the vertex parameter values stored in the memorywith a pixel shader wherein accessing the vertex parameter valuesincludes disabling or bypassing hardware that performs interpolation onvertex parameter values.
 2. The method of claim 1, further comprisinginterpolating the vertex parameter values with the pixel shader togenerate interpolated parameter values.
 3. The method of claim 2,further comprising performing pixel shader computations on theinterpolated parameter values.
 4. The method of claim 1 wherein thememory is a cache.
 5. The method of claim 4, wherein said accessing thevertex parameter values includes copying the vertex parameter valuesfrom the cache to a local memory unit, and accessing the vertexparameter values from the local memory unit with the pixel shader. 6.The method of claim 1, wherein the vertex parameter values includeparameter values of all three vertices of a triangle primitive.
 7. Themethod of claim 1, further comprising compressing the vertex parametervalues with the vertex shader.
 8. The method of claim 1, furthercomprising, before said compressing modifying the parameter values withthe vertex shader.
 9. A graphics processing system comprising: agraphics processing unit (GPU); and a cache; wherein the system isconfigured to implement a graphics processing method, the methodcomprising: implementing a vertex shader and a pixel shader with theGPU; storing vertex parameter values generated by a vertex shader in amemory; and accessing the vertex parameter values stored in the memorywith a pixel shader, wherein accessing the vertex parameter valuesincludes disabling or bypassing hardware that performs interpolation onvertex parameter values.
 10. The system of claim 9, wherein the GPUcomprises a plurality of compute units and a plurality of local memoryunits, wherein each of the local memory units are associated with arespective of the compute units.
 11. The system of claim 9, wherein thememory is a cache and wherein said accessing the vertex parameter valuesincludes copying the vertex parameter values from the cache to one ormore local memory units of the GPU, and accessing the vertex parametervalues from the one or more local memory units with the pixel shader.12. The system of claim 9, wherein the cache is integrated with the GPU.13. The system of claim 9, wherein the graphics processing methodfurther comprises interpolating the vertex parameter values with thepixel shader to generate interpolated parameter values.
 14. The systemof claim 13, wherein the graphics processing method further comprisesperforming pixel shader computations on the interpolation parametervalues.
 15. The system of claim 9, wherein the vertex parameter valuesinclude parameter values of all three vertices of a triangle primitive.16. The system of claim 9, wherein the graphics processing methodfurther comprises performing pixel shader computations on theinterpolation parameter values.
 17. The system of claim 9, wherein thegraphics processing method further comprises performing pixel shadercomputations on the interpolation parameter values.
 18. The system ofclaim 9, wherein the graphics processing method further comprisescompressing the vertex parameter values with the vertex shader.
 19. Thesystem of claim 18, wherein the graphics processing method furthercomprises, before said compressing modifying the parameter values withthe vertex shader.
 20. A non-transitory computer readable medium havingcomputer readable instructions embodied therein, the computer readableinstructions being configured to implement a graphics processing methodwhen executed, the graphics processing method comprising: storing vertexparameter values generated by a vertex shader in a memory; and accessingthe vertex parameter values stored in the memory with a pixel shader,wherein accessing the vertex parameter values includes disabling orbypassing hardware that performs interpolation on vertex parametervalues.